﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SetVersionNumber.VersionStrategies;

namespace SetVersionNumberTests.VersionStrategies {

	/// <summary>
	/// All of the unit tests for the <c>ExplicitVersionStrategy</c> class.
	/// </summary>
	[TestClass]
	public class ExplicitVersionStrategyTests {

		[TestMethod]
		public void ReturnedVersionStringIsWhateverTextItsToldToReturn( ) {
			// Setup our test
			const string input = "1.2.3.42";
			const string expected = "Hello mom!";

			// Run the test
			ExplicitVersionStrategy.UserDefinedVersionNumber = expected;
			var sut = new ExplicitVersionStrategy();
			var actual = sut.GetNextVersionNumber(input);
			Assert.AreEqual(expected, actual, "The version number returned from the DateAndBuildVersionStrategy strategy is not correct");
		}

	}//class

}//namespace
